<template>
  <div>
    <h1>组件CCom</h1>
    <h2>{{ $store.state.hanhan.name }}</h2>
    <h2>{{ $store.state.hanhan.age }}</h2>
    <button @click="addAge1">给涵涵加5</button>
  </div>
</template>

<script>
export default {
  methods: {
    addAge1() {
      this.$store.commit("addAge1");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>